package me.leiusual.sharing.repository

import io.reactivex.Single
import me.leiusual.sharing.api.ApiSharing
import me.leiusual.sharing.api.model.BusinessApply
import me.leiusual.sharing.api.model.BusinessLevel
import me.leiusual.sharing.api.model.BusinessType
import me.leiusual.sharing.api.model.businesscondition.BusinessCondition
import javax.inject.Inject
import javax.inject.Singleton

/**
 * author: leiusual
 * create on: 2019-07-29
 * description:
 */
@Singleton
class BusinessRepository @Inject constructor(
    private val apiSharing: ApiSharing
) {

  fun businessApply(): Single<List<BusinessType>> {
    return apiSharing.businessApply()
  }

  fun businessApply(strBuType: String): Single<List<BusinessLevel>> {
    return apiSharing.businessApply(strBuType)
  }

  fun businessApply(type: String, level: String): Single<BusinessCondition> {
    return apiSharing.businessApply(type, level)
  }

  fun businessApply(params: BusinessApply.Request): Single<List<BusinessApply.Response>> {
    return apiSharing.businessApply(params)
  }
}